package com.yanqu.road.server.cmd.activity.carptrip;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.CarpTripProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.carptrip.CrossCarpTripActivityMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CARP_TRIP_UPLOAD_DRAW_NOTICE, desc = "上传老虎机公告")
public class CrossCarpTripUploadDrawNoticeCmd extends CrossCommand {


    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        CarpTripProto.CarpTripUploadDrawNoticeMsg noticeMsg = CarpTripProto.CarpTripUploadDrawNoticeMsg.parseFrom(packet.getBytes());

        CrossCarpTripActivityMgr.addDrawNotice(noticeMsg.getActivityId(), serverId, packet.getPlayerId(), noticeMsg.getNoticeList());
    }

    @Override
    public void sendData() {

    }
}
